<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数组的增强</title>
</head>
<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
    </ul>
</body>
<script>
    //数组的合并
    arr1 = [1,2,3]
    arr2 = [4,5,6]
    // arr = arr1 + arr2
    // console.log(arr);

    // es6 数组的合并
    // spread ... 扩展运算符
    newArr = [...arr1,...arr2]   //...循环遍历的意思，节省了倪遍历数组的代码
    console.log(newArr);

    // 传参
    console.log(Math.max(...arr1,...arr2));
    
    // Array.from 将伪数组转化成真实数组
    const list = document.getElementsByTagName('li')
    console.log(Array.from(list));

</script>
</html>